<Window x:Class="EcoProject1.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Window1"
    xmlns:viewmodel="clr-namespace:Eco.ViewModel.WPF;assembly=Eco.WPF"
    xmlns:eco="clr-namespace:EcoProject1;assembly=EcoProject1.EcoSpace"
    xmlns:wecpof="clr-namespace:WECPOFLogic;assembly=WECPOFLogic" 
    Loaded="Window_Loaded"
        >
  <Window.Resources>
    <LinearGradientBrush x:Key="WECPOFWinBackgroundBrush" EndPoint="0,1" StartPoint="0,0">
      <GradientStop Color="#CCC" Offset="0.0" />
      <GradientStop Color="#EEE" Offset="1.0" />
    </LinearGradientBrush>


    <LinearGradientBrush x:Key="WECPOFWinFrameBrush" EndPoint="0,1" StartPoint="0,0">
      <GradientStop Color="#CCC" Offset="0.0" />
      <GradientStop Color="#EEE" Offset="1.0" />
    </LinearGradientBrush>



    <LinearGradientBrush x:Key="WECPOFWinContentBackgroundBrush" EndPoint="0,1" StartPoint="0,0">
      <GradientStop Color="#EEE" Offset="0.0" />
      <GradientStop Color="#CCC" Offset="1.0" />
    </LinearGradientBrush>


    <ControlTemplate x:Key="validationTemplate">
      <DockPanel>
        <Border BorderBrush="Red" BorderThickness="2" CornerRadius="4,4,4,4"  >
          <AdornedElementPlaceholder/>
        </Border>
        <TextBlock Foreground="Red" VerticalAlignment="Center" FontWeight="ExtraBold" Margin="4">!</TextBlock>
      </DockPanel>
    </ControlTemplate>

    <Style TargetType="TextBox">
      <Setter Property="Validation.ErrorTemplate" Value="{StaticResource validationTemplate}"></Setter>
      <Style.Triggers>
        <Trigger Property="Validation.HasError" Value="true">
          <Setter Property="TextBox.ToolTip" Value="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors)[0].ErrorContent}"/>
        </Trigger>
      </Style.Triggers>
    </Style>

  </Window.Resources>
  <Grid x:Name="MainGrid">

    <wecpof:WECPOFWindowEnvironment x:Name="WecpofWinEnv" >

    </wecpof:WECPOFWindowEnvironment>
  </Grid>

</Window>
